﻿using System;
using System.Windows.Forms;
using System.ComponentModel;

namespace ESOL.Controls
{
    public partial class EsolComboBox : ComboBox
    {
        public EsolComboBox()
        {
            InitializeComponent();
            this.Size = new System.Drawing.Size(150,21);
        }

        public EsolComboBox(IContainer container)
        {
            container.Add(this);

            InitializeComponent();
            this.Size = new System.Drawing.Size(150, 21);
        }

        public void SetSelectedValue(object oValue)
        {
            if (oValue == null)
            {
                this.SelectedIndex = -1;
            }
            else
            {
                this.SelectedValue = oValue;
            }
        }
    }
}
